3.10 \(\int (-\frac {b \cos (a+b x-c x^2)}{x}+\frac {\sin (a+b x-c x^2)}{x^2}) \, dx\)

Optimal. Leaf size=110 \[ \sqrt {2 \pi } \sqrt {c} \cos \left (a+\frac {b^2}{4 c}\right ) C\left (\frac {b-2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )+\sqrt {2 \pi } \sqrt {c} \sin \left (a+\frac {b^2}{4 c}\right ) S\left (\frac {b-2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )-\frac {\sin \left (a+b x-c x^2\right )}{x} \]

[Out]

-sin(-c*x^2+b*x+a)/x+cos(a+1/4/c*b^2)*FresnelC(1/2*(-2*c*x+b)/c^(1/2)*2^(1/2)/Pi^(1/2))*c^(1/2)*2^(1/2)*Pi^(1/
2)+FresnelS(1/2*(-2*c*x+b)/c^(1/2)*2^(1/2)/Pi^(1/2))*sin(a+1/4/c*b^2)*c^(1/2)*2^(1/2)*Pi^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {3465, 3448, 3352, 3351} \[ \sqrt {2 \pi } \sqrt {c} \cos \left (a+\frac {b^2}{4 c}\right ) \text {FresnelC}\left (\frac {b-2 c x}{\sqrt {2 \pi } \sqrt {c}}\right )+\sqrt {2 \pi } \sqrt {c} \sin \left (a+\frac {b^2}{4 c}\right ) S\left (\frac {b-2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )-\frac {\sin \left (a+b x-c x^2\right )}{x} \]

Antiderivative was successfully verified.

[In]

Int[-((b*Cos[a + b*x - c*x^2])/x) + Sin[a + b*x - c*x^2]/x^2,x]

[Out]

Sqrt[c]*Sqrt[2*Pi]*Cos[a + b^2/(4*c)]*FresnelC[(b - 2*c*x)/(Sqrt[c]*Sqrt[2*Pi])] + Sqrt[c]*Sqrt[2*Pi]*FresnelS
[(b - 2*c*x)/(Sqrt[c]*Sqrt[2*Pi])]*Sin[a + b^2/(4*c)] - Sin[a + b*x - c*x^2]/x

Rule 3351

Int[Sin[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]*FresnelS[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)])/
(f*Rt[d, 2]), x] /; FreeQ[{d, e, f}, x]

Rule 3352

Int[Cos[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]*FresnelC[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)])/
(f*Rt[d, 2]), x] /; FreeQ[{d, e, f}, x]

Rule 3448

Int[Cos[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[Cos[(b^2 - 4*a*c)/(4*c)], Int[Cos[(b + 2*c*x)^2/
(4*c)], x], x] + Dist[Sin[(b^2 - 4*a*c)/(4*c)], Int[Sin[(b + 2*c*x)^2/(4*c)], x], x] /; FreeQ[{a, b, c}, x] &&
 NeQ[b^2 - 4*a*c, 0]

Rule 3465

Int[((d_.) + (e_.)*(x_))^(m_)*Sin[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[((d + e*x)^(m + 1)*Sin
[a + b*x + c*x^2])/(e*(m + 1)), x] + (-Dist[(2*c)/(e^2*(m + 1)), Int[(d + e*x)^(m + 2)*Cos[a + b*x + c*x^2], x
], x] - Dist[(b*e - 2*c*d)/(e^2*(m + 1)), Int[(d + e*x)^(m + 1)*Cos[a + b*x + c*x^2], x], x]) /; FreeQ[{a, b,
c, d, e}, x] && NeQ[b*e - 2*c*d, 0] && LtQ[m, -1]

Rubi steps

\begin {align*} \int \left (-\frac {b \cos \left (a+b x-c x^2\right )}{x}+\frac {\sin \left (a+b x-c x^2\right )}{x^2}\right ) \, dx &=-\left (b \int \frac {\cos \left (a+b x-c x^2\right )}{x} \, dx\right )+\int \frac {\sin \left (a+b x-c x^2\right )}{x^2} \, dx\\ &=-\frac {\sin \left (a+b x-c x^2\right )}{x}-(2 c) \int \cos \left (a+b x-c x^2\right ) \, dx\\ &=-\frac {\sin \left (a+b x-c x^2\right )}{x}-\left (2 c \cos \left (a+\frac {b^2}{4 c}\right )\right ) \int \cos \left (\frac {(b-2 c x)^2}{4 c}\right ) \, dx-\left (2 c \sin \left (a+\frac {b^2}{4 c}\right )\right ) \int \sin \left (\frac {(b-2 c x)^2}{4 c}\right ) \, dx\\ &=\sqrt {c} \sqrt {2 \pi } \cos \left (a+\frac {b^2}{4 c}\right ) C\left (\frac {b-2 c x}{\sqrt {c} \sqrt {2 \pi }}\right )+\sqrt {c} \sqrt {2 \pi } S\left (\frac {b-2 c x}{\sqrt {c} \sqrt {2 \pi }}\right ) \sin \left (a+\frac {b^2}{4 c}\right )-\frac {\sin \left (a+b x-c x^2\right )}{x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.81, size = 115, normalized size = 1.05 \[ -\frac {\sqrt {2 \pi } \sqrt {c} x \cos \left (a+\frac {b^2}{4 c}\right ) C\left (\frac {2 c x-b}{\sqrt {c} \sqrt {2 \pi }}\right )+\sqrt {2 \pi } \sqrt {c} x \sin \left (a+\frac {b^2}{4 c}\right ) S\left (\frac {2 c x-b}{\sqrt {c} \sqrt {2 \pi }}\right )+\sin (a+x (b-c x))}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[-((b*Cos[a + b*x - c*x^2])/x) + Sin[a + b*x - c*x^2]/x^2,x]

[Out]

-((Sqrt[c]*Sqrt[2*Pi]*x*Cos[a + b^2/(4*c)]*FresnelC[(-b + 2*c*x)/(Sqrt[c]*Sqrt[2*Pi])] + Sqrt[c]*Sqrt[2*Pi]*x*
FresnelS[(-b + 2*c*x)/(Sqrt[c]*Sqrt[2*Pi])]*Sin[a + b^2/(4*c)] + Sin[a + x*(b - c*x)])/x)

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 124, normalized size = 1.13 \[ -\frac {\sqrt {2} \pi x \sqrt {\frac {c}{\pi }} \cos \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) \operatorname {C}\left (\frac {\sqrt {2} {\left (2 \, c x - b\right )} \sqrt {\frac {c}{\pi }}}{2 \, c}\right ) + \sqrt {2} \pi x \sqrt {\frac {c}{\pi }} \operatorname {S}\left (\frac {\sqrt {2} {\left (2 \, c x - b\right )} \sqrt {\frac {c}{\pi }}}{2 \, c}\right ) \sin \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) - \sin \left (c x^{2} - b x - a\right )}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cos(-c*x^2+b*x+a)/x+sin(-c*x^2+b*x+a)/x^2,x, algorithm="fricas")

[Out]

-(sqrt(2)*pi*x*sqrt(c/pi)*cos(1/4*(b^2 + 4*a*c)/c)*fresnel_cos(1/2*sqrt(2)*(2*c*x - b)*sqrt(c/pi)/c) + sqrt(2)
*pi*x*sqrt(c/pi)*fresnel_sin(1/2*sqrt(2)*(2*c*x - b)*sqrt(c/pi)/c)*sin(1/4*(b^2 + 4*a*c)/c) - sin(c*x^2 - b*x
- a))/x

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int -\frac {b \cos \left (-c x^{2} + b x + a\right )}{x} + \frac {\sin \left (-c x^{2} + b x + a\right )}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cos(-c*x^2+b*x+a)/x+sin(-c*x^2+b*x+a)/x^2,x, algorithm="giac")

[Out]

integrate(-b*cos(-c*x^2 + b*x + a)/x + sin(-c*x^2 + b*x + a)/x^2, x)

________________________________________________________________________________________

maple [F]  time = 0.62, size = 0, normalized size = 0.00 \[ \int -\frac {b \cos \left (-c \,x^{2}+b x +a \right )}{x}+\frac {\sin \left (-c \,x^{2}+b x +a \right )}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-b*cos(-c*x^2+b*x+a)/x+sin(-c*x^2+b*x+a)/x^2,x)

[Out]

int(-b*cos(-c*x^2+b*x+a)/x+sin(-c*x^2+b*x+a)/x^2,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int -\frac {b \cos \left (c x^{2} - b x - a\right )}{x} - \frac {\sin \left (c x^{2} - b x - a\right )}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cos(-c*x^2+b*x+a)/x+sin(-c*x^2+b*x+a)/x^2,x, algorithm="maxima")

[Out]

integrate(-b*cos(c*x^2 - b*x - a)/x - sin(c*x^2 - b*x - a)/x^2, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sin \left (-c\,x^2+b\,x+a\right )}{x^2}-\frac {b\,\cos \left (-c\,x^2+b\,x+a\right )}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x - c*x^2)/x^2 - (b*cos(a + b*x - c*x^2))/x,x)

[Out]

int(sin(a + b*x - c*x^2)/x^2 - (b*cos(a + b*x - c*x^2))/x, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \int \left (- \frac {\sin {\left (a + b x - c x^{2} \right )}}{x^{2}}\right )\, dx - \int \frac {b \cos {\left (a + b x - c x^{2} \right )}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-b*cos(-c*x**2+b*x+a)/x+sin(-c*x**2+b*x+a)/x**2,x)

[Out]

-Integral(-sin(a + b*x - c*x**2)/x**2, x) - Integral(b*cos(a + b*x - c*x**2)/x, x)

________________________________________________________________________________________